package com.tbit.uqbike.object.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tbit.uqbike.enums.DispatchApplyHandleType;
import com.tbit.uqbike.webmanager.util.csv.annotations.Csv;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * 调度申请记录
 *
 * @Author: chen
 * @Description: 调度申请记录
 * @Date: 创建于 15:21 2023/2/10
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "dispatchapplylog")
public class DispatchApplyLog {

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer applyId;
    /**
     * 区域ID
     */
    private Integer accountId;
    /**
     * 申请数量
     */
    @Csv(name = "车辆数量")
    private Integer applyNum;
    /**
     * 申请时间
     */
    @Csv(name = "申请时间")
    private Date applyTime;
    /**
     * 开始经度
     */
    private Double lo;
    /**
     * 开始纬度
     */
    private Double la;
    /**
     * 申请理由
     */
    private String applyReason;
    /**
     * 申请人id
     */
    private Integer applyUserId;
    /**
     * 申请人名称
     */
    @Csv(name = "申请人")
    private String applyUserName;
    /**
     * 申请人手机号
     */
    @Csv(name = "申请人手机号")
    private String applyUserPhone;
    /**
     * 处理时间
     */
    @Csv(name = "处理时间")
    private Date handleTime;

    /**
     * 处理方式 system:系统审核  manual:人工审核
     */
    @Csv(name = "处理方式")
    private DispatchApplyHandleType  handleType;

    /**
     * 处理人ID
     */
    private Integer stockUserId;
    /**
     * 处理人名称
     */
    @Csv(name = "处理人")
    private String stockUserName;
    /**
     * 状态 0未处理 1审核通过、2驳回
     */
    private Integer state;

    /**
     * 现场照片  url
     */
    @TableField("photoUrl")
    private List<String>  photoUrls;
    /**
     * 处理备注
     */
    private String handleMsg;
    /**
     * 备注
     */
    private String remark;

    public DispatchApplyLog(Integer accountId, Integer applyNum, Date applyTime, Double lo,
                            Double la, String applyReason, Integer applyUserId, String applyUserName,
                            Integer state) {
        this.accountId = accountId;
        this.applyNum = applyNum;
        this.applyTime = applyTime;
        this.lo = lo;
        this.la = la;
        this.applyReason = applyReason;
        this.applyUserId = applyUserId;
        this.applyUserName = applyUserName;
        this.state = state;
    }
}
